package com.example.springbootservice.dao;

import com.example.springbootservice.model.UserInfo;
import com.example.springbootservice.model.event.UserEventModel;
import com.ly.common.running.dao.MybatisDao;
import com.ly.common.running.start.EventListener;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserDao {
    @Resource
    private MybatisDao mybatisDao;

    public UserInfo findUser(UserInfo userInfo){
        UserInfo users = mybatisDao.selectOne(userInfo);
        EventListener.postEvent(new UserEventModel("1"));
        return users;
    }
}
